<template>
  <div class="common-layout">
    <el-container>
      <el-aside width="200px">
        <el-col :span="28">
        <el-menu
          active-text-color="#ffd04b"
          background-color="rgba(49,65,86)"
          class="el-menu-vertical-demo"
          default-active="2"
          text-color="#fff"
          @open="handleOpen"
          @close="handleClose"
          router
        >
          <p
            style="
              color: white;
              font-size: 18px;
              margin-left: 20px;
              padding-top: 15px;
            "
          >
            通用后台管理系统
          </p>
          <el-sub-menu index="1">
            <template #title>
              <span>系统管理</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="/layout/index">用户管理</el-menu-item>
              <el-menu-item index="1-2">角色管理</el-menu-item>
              <el-menu-item index="1-3">菜单管理</el-menu-item>
              <el-menu-item index="1-3">部门管理</el-menu-item>
              <el-menu-item index="1-3">岗位管理</el-menu-item>
              <el-menu-item index="1-3">字典管理</el-menu-item>
              <el-menu-item index="1-3">参数设置</el-menu-item>
              <el-menu-item index="1-3">通知公告</el-menu-item>
            </el-menu-item-group>
          </el-sub-menu>
          <el-sub-menu index="2">
            <template #title>
              <span>系统监考</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="2-1">在线用户</el-menu-item>
              <el-menu-item index="2-2">定时任务</el-menu-item>
              <el-menu-item index="2-3">服务监控</el-menu-item>
              <el-menu-item index="2-3">缓存监控</el-menu-item>
            </el-menu-item-group>
          </el-sub-menu>
        </el-menu>
      </el-col>
      </el-aside>
      <el-main>
        <router-view></router-view>
      </el-main>
    </el-container>
  </div>
</template>

<script setup lang="ts">
import {
  Document,
  Menu as IconMenu,
  Location,
  Setting,
} from "@element-plus/icons-vue";
// import Index from "./views/Index.vue";
const handleOpen = (key: string, keyPath: string[]) => {
  console.log(key, keyPath);
};
const handleClose = (key: string, keyPath: string[]) => {
  console.log(key, keyPath);
};
</script>

<style scoped>
.el-menu {
  height: 100vh;
}
</style>